<?php
/**
 * 会员后台控制器
 * 
 * @version $Id: Main.php 289 2012-05-02 08:40:09Z linsir123 $
 */
class controllerMain extends UserController 
{
	/**
	 * 默认的控制器名称
	 */
	public $defaultAction = 'home';
	
	/**
	 * @var 模型
	 */
	public $mExchange;
	
	/**
	 * @var 模型
	 */
	public $mAccount;
	
	/**
	 * @var 模型
	 */
	public $mOrder;
	
	/**
	 * 构造函数
	 */
	public function __construct()
	{
		parent::__construct();
		
		///
		$this->mAccount = M::account();
		$this->mExchange = M::exchange();
		$this->mOrder = M::order();
	}
	
	/**
	 * 管理首页
	 */
	public function actionHome()
	{
		View::display('home');
		View::assignSet(array(
			'curMenu' => 'home',
			'exchange' => $this->mExchange->getInfo(),
			'account' => $this->mAccount->getInfo(),
			'order' => $this->mOrder->getInfo(),
		));
	}
}
